package com.thread;


import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

/**
 * @Author weijingchen
 * @Date 2025/6/17 22:30
 * @Version 1.0.0
 */
public class Test {


    public static void main(String[] args) throws ExecutionException, InterruptedException {
        TestCallable callable = new TestCallable();
        //未注明泛型的，默认为object
        FutureTask ft = new FutureTask<>(callable);

        Thread thread = new Thread(ft);
        thread.start();
        Object object = ft.get();
        System.out.println(object);
    }
}
